<template>
	<div class="u-page" style="background:#f7f7f7">
		<section class="aui-flexView">
			<section class="aui-scrollView">
				<div class="aui-order-box">
					<div class="aui-flex-goodsbox aui-flex-default aui-mar15" @click="goToGoodsDetail">
						<div class="aui-flex-goods">
							<img :src="goods.goodsImages.split(',')[0]" alt="">
						</div>
						<div class="aui-flex-box">
							<h2>{{goods.goodsName}}</h2>
							<div class="goods-box-spec u-fz-13">{{goods.specification}}</div>
							<div class="aui-flex-clear">
								<div class="goods-box-price">￥{{goods.discountPrice}}</div>
							</div>
						</div>
					</div>

					<!-- 基本设置 -->
					<div class="aui-flex-default border-radius30">
						<div class="aui-flex aui-choice-white b-line u-center u-font-bold u-pt-15 u-pb-15">
							<u-divider color="#e55e97" fontSize="30" border-color="#e55e97" >基本设置</u-divider>
						</div>
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">活动名称</div>
							<u-input v-model="form.subject" input-align="right" placeholder="请填写活动名称"/>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">标题标签</div>
							<u-input v-model="form.label" input-align="right" maxlength="4" placeholder="请填写标题标签"/>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">活动价格(元)<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('samplePrice')"></u-icon>
								</span></div>
							<u-input v-model="form.samplePrice" input-align="right" placeholder="请填写金额" @blur="checkMoney($event, 'price')"
								@input="calculate" />
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">样品规格<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('specification')"></u-icon>
								</span></div>
							<u-input v-model="form.specification" input-align="right" placeholder="请填写样品规格"/>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">样品总数(个)<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('sampleQuota')"></u-icon>
								</span></div>
							<u-input v-model="form.sampleQuota" type="number" input-align="right" placeholder="请填写数量"
								@input="calculate" />
						</div>
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">报名截止时间<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30" @click="showTips('joinEndTime')">
									</u-icon>
								</span></div>
							<div class="aui-flex-triangle" @click="joinEndTime_show = true">
								<span v-if="form.joinEndTime">{{form.joinEndTime}}</span>
								<span v-else>请选择</span>
							</div>
							<u-picker v-model="joinEndTime_show" mode="time" @confirm="SelectJoinEndTime($event)">
							</u-picker>
						</div>
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">样品推广客服<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30" @click="showTips('CS')"></u-icon>
								</span></div>
							<div class="aui-flex-triangle" @click="CS_show = true">{{csNameText?csNameText:'请选择'}}</div>
							<u-select v-model="CS_show" :list="CSRange" @confirm="SelectCS"></u-select>
						</div>
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">限制报名周期(天)<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('joinLimitDays')"></u-icon>
								</span></div>
							<div class="aui-flex-triangle" @click="joinLimitDays_show = true">{{joinLimitDays_text}}
							</div>
							<u-picker mode="selector" v-model="joinLimitDays_show" :default-selector="[0]"
								:range="joinLimitDaysRange"
								@confirm="joinLimitDays_text = joinLimitDaysRange[$event]"></u-picker>
						</div>
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">活动公开<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('open')"></u-icon>
								</span>
							</div>
							<div class="aui-flex-triangle" @click="open_show = true">{{open_text}}
							</div>
							<u-picker mode="selector" v-model="open_show" :default-selector="[0]"
								:range="selectRange"
								@confirm="open_text = selectRange[$event]"></u-picker>
						</div>
						
						<!-- 活动受众 -->
						<div class="aui-flex aui-choice-white b-line u-center u-font-bold u-pt-15 u-pb-15">
							<u-divider color="#e55e97" fontSize="30" border-color="#e55e97" >活动受众</u-divider>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">活动面向群体<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('eventParticipants')"></u-icon>
								</span></div>
							<div class="aui-flex-triangle" @click="eventParticipants_show = true">
								<span v-if="eventParticipants_text">{{eventParticipants_text}}</span>
								<span v-else>请选择</span>
							</div>
							<u-picker mode="selector" v-model="eventParticipants_show" :default-selector="[1]"
								:range="eventParticipantsRange"
								@confirm="eventParticipants_text = eventParticipantsRange[$event]"></u-picker>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">等级要求<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('restrictionLevel')"></u-icon>
								</span>
							</div>
							<div class="aui-flex-triangle" @click="restrictionLevel_show = true">{{restrictionLevel_text}}
							</div>
							<u-picker mode="selector" v-model="restrictionLevel_show" :default-selector="[0]"
								:range="restrictionLevelRange"
								@confirm="restrictionLevel_text = restrictionLevelRange[$event]"></u-picker>
						</div>
						
						<!-- 开启反馈 -->
						<!-- <div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">开启反馈</div>
							<div class="aui-flex-triangle" @click="enableFeedback_show = true">
								<span v-if="enableFeedback_text">{{enableFeedback_text}}</span>
								<span v-else>请选择</span>
							</div>
							<u-picker mode="selector" v-model="enableFeedback_show" :default-selector="[0]"
								:range="enableFeedbackRange" @confirm="enableFeedback_text = enableFeedbackRange[$event]"></u-picker>
						</div> -->
						
						<!-- 试用设置 -->
						<div class="aui-flex aui-choice-white b-line u-center u-font-bold u-pt-15 u-pb-15">
							<u-divider color="#e55e97" fontSize="30" border-color="#e55e97" >试用设置</u-divider>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">试用报告<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('enableReport')"></u-icon>
								</span>
							</div>
							<div class="aui-flex-triangle" @click="enableReport_show = true">{{enableReport_text}}
							</div>
							<u-picker mode="selector" v-model="enableReport_show" :default-selector="[0]"
								:range="selectRange"
								@confirm="enableReport_text = selectRange[$event]"></u-picker>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">试用素材<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('enableMaterial')"></u-icon>
								</span>
							</div>
							<div class="aui-flex-triangle" @click="enableMaterial_show = true">{{enableMaterial_text}}
							</div>
							<u-picker mode="selector" v-model="enableMaterial_show" :default-selector="[0]"
								:range="selectRange"
								@confirm="enableMaterial_text = selectRange[$event]"></u-picker>
						</div>
						
						<div class="aui-flex aui-choice-white b-line">
							<div class="aui-flex-box">社交平台截图凭证<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('enableSocial')"></u-icon>
								</span>
							</div>
							<div class="aui-flex-triangle" @click="enableSocial_show = true">{{enableSocial_text}}
							</div>
							<u-picker mode="selector" v-model="enableSocial_show" :default-selector="[0]"
								:range="selectRange"
								@confirm="enableSocial_text = selectRange[$event]"></u-picker>
						</div>
						
						<div class="aui-flex aui-choice-white">
							<div class="aui-flex-box">试用要求<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('requiredContent')"></u-icon>
								</span>
							</div>
						</div>
						<div class="aui-flex aui-choice-white b-line" style="padding-top: 0;">
							<div class="textarea-block">
								<u-input
									type="textarea"
									placeholder="请填写试用要求"
									maxlength="1000"
									height="300"
									:autoHeight="false"
									v-model="form.requiredContent"
								></u-input>
							</div>
						</div>
						
						<!-- 报酬设置 -->
						<div class="aui-flex aui-choice-white b-line u-center u-font-bold u-pt-15 u-pb-15">
							<u-divider color="#e55e97" fontSize="30" border-color="#e55e97" >报酬设置</u-divider>
						</div>
						<div class="aui-choice-white b-line coupon-item">
							<div class="aui-flex-box-title">A级
								<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="35"
										@click="showTips('levelAReward')"></u-icon>
								</span>
							</div>
							<div class="aui-flex2">
								<div class="aui-flex-box">现金报酬（￥）</div>
								<u-input v-model="form.levelAReward" type="digit" input-align="right" placeholder="请填写A级报酬" @blur="checkMoney($event, 'A')"/>
							</div>
							<div class="aui-flex3">
								<div class="u-flex" style="width: 100%;">
									<div class="aui-flex-box">优惠券（￥）</div>
									<u-input v-model="form.levelACouponAmount" type="digit" input-align="right" placeholder="请填写优惠券金额"/>
								</div>
								<div style="width: 100%;display: flex;flex-direction: row-reverse;">
									<u-radio-group v-model="couponA" @change="radioGroupChangeA">
										<u-radio v-for="(item, index) in couponList" :key="index" :name="item.name" :disabled="item.disabled">
											{{ item.name }}
										</u-radio>
									</u-radio-group>
								</div>
							</div>
						</div>
						
						<div class="aui-choice-white b-line coupon-item">
							<div class="aui-flex-box-title">B级
								<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="35"
										@click="showTips('levelBReward')"></u-icon>
								</span>
							</div>
							<div class="aui-flex2">
								<div class="aui-flex-box">现金报酬（￥）</div>
								<u-input v-model="form.levelBReward" type="digit" input-align="right" placeholder="请填写B级报酬" @blur="checkMoney($event, 'B')"/>
							</div>
							<div class="aui-flex3">
								<div class="u-flex" style="width: 100%;">
									<div class="aui-flex-box">优惠券（￥）</div>
									<u-input v-model="form.levelBCouponAmount" type="digit" input-align="right" placeholder="请填写优惠券金额"/>
								</div>
								<div style="width: 100%;display: flex;flex-direction: row-reverse;">
									<u-radio-group v-model="couponB" @change="radioGroupChangeB">
										<u-radio v-for="(item, index) in couponList" :key="index" :name="item.name" :disabled="item.disabled">
											{{ item.name }}
										</u-radio>
									</u-radio-group>
								</div>
							</div>
						</div>
						
						<div class="aui-choice-white b-line coupon-item">
							<div class="aui-flex-box-title">C级
								<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="35"
										@click="showTips('levelCReward')"></u-icon>
								</span>
							</div>
							<div class="aui-flex2">
								<div class="aui-flex-box">现金报酬（￥）</div>
								<u-input v-model="form.levelCReward" type="digit" input-align="right" placeholder="请填写C级报酬" @blur="checkMoney($event, 'C')"/>
							</div>
							<div class="aui-flex3">
								<div class="u-flex" style="width: 100%;">
									<div class="aui-flex-box">优惠券（￥）</div>
									<u-input v-model="form.levelCCouponAmount" type="digit" input-align="right" placeholder="请填写优惠券金额"/>
								</div>
								<div style="width: 100%;display: flex;flex-direction: row-reverse;">
									<u-radio-group v-model="couponC" @change="radioGroupChangeC">
										<u-radio v-for="(item, index) in couponList" :key="index" :name="item.name" :disabled="item.disabled">
											{{ item.name }}
										</u-radio>
									</u-radio-group>
								</div>
							</div>
						</div>
						
						<div class="aui-flex aui-choice-white">
							<div class="aui-flex-box">评级标准<span class="u-pl-5">
									<u-icon name="question-circle" top="1" size="30"
										@click="showTips('ratingCriteria')"></u-icon>
								</span>
							</div>
						</div>
						<div class="aui-flex aui-choice-white b-line" style="padding-top: 0;">
							<div class="textarea-block">
								<u-input
									type="textarea"
									placeholder="请填写评级标准"
									maxlength="1000"
									height="300"
									:autoHeight="false"
									v-model="form.ratingCriteria"
								></u-input>
							</div>
						</div>
					</div>

				</div>
			</section>

			<div style="height: 30px;"></div>

			<div class="aui-bar-footer">
				<div class="aui-flex-footer">
					<div class="aui-flex-box">
						应付金额：<span>￥{{form.purchasePrice?form.purchasePrice:'0.00'}}</span>
					</div>
					<div>
						<u-button :disabled="isClick"
							:custom-style="{background:'#f21956',padding:'52rpx 50rpx',color:'#fff',fontSize:'28rpx',borderRadius:'0rpx'}"
							hover-class="none" @click="goToPay">去支付</u-button>
					</div>
				</div>
			</div>

			<!-- 点击问号弹出提示窗 -->
			<div>
				<u-modal v-model="TipsShow" :content="TipsContent"></u-modal>
			</div>

			<!-- 弹窗【报名截止时间不能选择今天之前的日期】 -->
			<u-modal ref="uModal" title="平台提示" v-model="date_show" confirm-text="确认">
				<div class="u-p-20">
					<p>报名截止时间不能选择今天及之前的日期！请重新选择</p>
				</div>
			</u-modal>
		</section>

		<!-- 选择支付的方式 -->
		<u-popup v-model="showItem" mode="bottom" @close="closePopup">
			<div class="popup-box">
				<div class="popup-item" v-for="(item, index) in chooseTypes" @click="clickPopup(item)">
					<div>{{item.text}}</div>
				</div>
			</div>
		</u-popup>

	</div>
</template>

<script>
	import globalData from "@/globalData";
	export default {
		data() {
			return {
				form: {
					subject: '',// 活动名称
					label: '',// 标题标签
					samplePrice: '0', // 样品价格
					specification: '',// 样品规格
					sampleQuota: '', // 样品总量
					joinEndTime: '', // 报名截止时间
					purchasePrice: '0', // 应付金额
					customerServiceId: '', // 样品客服ID
					orderId: '', // 支付订单ID
					levelAReward: 0.00,// A级报酬
					levelBReward: 0.00,// B级报酬
					levelCReward: 0.00,// C级报酬
					levelACouponAmount: 0.00,// A级优惠券金额
					levelBCouponAmount: 0.00,// B级优惠券金额
					levelCCouponAmount: 0.00,// C级优惠券金额
					levelACouponRange: '0',// A级优惠券适用范围。0此商品；1全部商品
					levelBCouponRange: '0',// B级优惠券适用范围。0此商品；1全部商品
					levelCCouponRange: '0',// C级优惠券适用范围。0此商品；1全部商品
					open: '0',// 是否公开活动。0否；1是
				},
				goods: {}, // 商品信息
				CS_show: false, // 客服选择弹窗控制
				CSRange: [],
				csNameText: '',
				joinLimitDays_show: false,
				joinLimitDaysRange: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '15', '22', '31'], // 默认0
				joinLimitDays_text: '0', // 限制报名周期(天)
				restrictionLevel_show: false,
				restrictionLevelRange: ['A级', 'B级+', 'C级+', 'D级+', 'E级+', 'F级+'],
				restrictionLevel_text: '请选择', // 等级要求
				eventParticipants_show: false, // 活动面向群体。0:测评师；1:区域服务商
				eventParticipantsRange: ['测评师', '区域服务商'],
				eventParticipants_text: '区域服务商',
				joinEndTime_show: false, // 报名截止时间选择弹窗控制
				isClick: false,
				date_show: false,
				TipsShow: false,
				TipsContent: '',
				TipsContentObj: {}, // 提示语
				showItem: false,
				PrivilegedStatus: '', // 是否为支付特权人员。yes:是；no:否。默认：no
				chooseTypes: [{
						text: '全额付款',
						action: 'fullPayment'
					},
					{
						text: '支付0.01元',
						action: 'payALittle'
					},
					{
						text: '取消',
						action: 'closePopup'
					}
				],
				enableFeedbackRange: ['否', '是'],
				enableFeedback_show: false, // 开启反馈功能弹窗控制
				enableFeedback_text: '是',
				enableReport_show: false,// 是否需要填写试用报告
				enableReport_text: '是',
				enableMaterial_show: false,// 是否需要上传试用素材
				enableMaterial_text: '是',
				enableSocial_show: false,// 是否需要上传社交平台截图凭证
				enableSocial_text: '是',
				selectRange: ['是', '否'],
				open_show: false,
				open_text: '是',// 是否公开活动
				couponList: [
					{
						name: '此商品',
						value: '0',
						disabled: false
					},
					{
						name: '全部商品',
						value: '1',
						disabled: false
					}
				],
				couponA: '此商品',
				couponB: '此商品',
				couponC: '此商品',
			}
		},

		onLoad(options) {
			// 未登录跳转到登录页面
			var loginRes = this.checkLogin()
			if (!loginRes) {
				return false;
			}

			let goods_info = decodeURIComponent(options.goods);
			this.goods = JSON.parse(goods_info);
			console.log("this.goods=", this.goods)
			
			// 初始化活动名称为商品名称
			this.form.subject = this.goods.goodsName;
			
			// 初始化样品规格为商品规格
			if(this.isNotNull(this.goods.specification)){
				this.form.specification = this.goods.specification
			}
			
			// 初始化样品客服为商品客服
			if(this.isNotNull(this.goods.openKfid)){
				this.form.customerServiceId = this.goods.openKfid
			}

			// 获取客服人员列表
			// this.getCSRange();
			this.getKFRange();

			// 根据userid获取支付特权状态
			this.getPrivilegedStatus();

			// 获取提示语
			this.getTipsContentObj();
		},

		methods: {

			/**
			 * 获取客服人员列表
			 */
			async getCSRange() {
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/clientele/list",
					csType: "样品客服",
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					let list = result.rows;

					list.forEach((item) => {
						let obj = {
							value: item.csId,
							label: item.csName,
						}
						this.CSRange.push(obj);
					});
					if (this.CSRange.length > 0) {
						this.csNameText = this.CSRange[0].label;
						this.form.customerServiceId = this.CSRange[0].value;
					}

				}
			},
			
			/**
			 * 获取客服人员列表
			 */
			async getKFRange() {
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/qyapi/kf/account/list/applet",
					name: "样品",
					loading: false // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					let rows = result.data;
					if(rows.length > 0){
						for(let i in rows){
							let obj = {
								value: rows[i].openKfid,
								label: rows[i].name,
							}
							this.CSRange.push(obj)
						}
						if(this.CSRange.length > 0){
							this.form.customerServiceId = this.CSRange[0].value;// 默认选择
							this.csNameText = this.CSRange[0].label;
						}
					}
				}
			},
			

			/**
			 * 根据userid获取支付特权状态
			 */
			async getPrivilegedStatus() {
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/user/canQuickPay/" + userInfo.userId,
					loading: false // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.PrivilegedStatus = result.data
				}
			},

			/**
			 * 获取提示语
			 */
			async getTipsContentObj() {
				/* const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyRequest({
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					appid: 'ProductPromote',
					wf_num: 'R_ProductPromote_B012',
					loading: false // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					this.TipsContentObj = result.data
				} */
			},

			/**
			 * 校验是否为金额类型
			 */
			checkMoney(money, tag) {
				if (this.isNotNull(money)) {
					const reg = /^\d+(\.\d{0,2})?$/;
					if (!(reg.test(money))) {
						this.$u.toast("金额只能输入正整数，或最多保留2位小数！");
						if(tag == 'price'){
							this.form.samplePrice = '';
						}
						if(tag == 'A'){
							this.form.levelAReward = 0;
						}
						if(tag == 'B'){
							this.form.levelBReward = 0;
						}
						if(tag == 'C'){
							this.form.levelCReward = 0;
						}
					}
				}
			},

			/**
			 * 计算需要支付的金额
			 */
			calculate() {
				if (this.isNotNull(this.form.samplePrice) && this.isNotNull(this.form.sampleQuota)) {
					this.form.purchasePrice = (parseFloat(this.form.samplePrice) * Number(this.form.sampleQuota)).toFixed(2);
				}
			},

			// 选中任一radio时，由radio-group触发
			radioGroupChangeA(e) {
				for (let i in this.couponList) {
					if (this.couponList[i].name == e) {
						this.form.levelACouponRange = this.couponList[i].value;
					}
				}
			},
			// 选中任一radio时，由radio-group触发
			radioGroupChangeB(e) {
				for (let i in this.couponList) {
					if (this.couponList[i].name == e) {
						this.form.levelBCouponRange = this.couponList[i].value;
					}
				}
			},
			// 选中任一radio时，由radio-group触发
			radioGroupChangeC(e) {
				for (let i in this.couponList) {
					if (this.couponList[i].name == e) {
						this.form.levelCCouponRange = this.couponList[i].value;
					}
				}
			},

			/**
			 * 跳转到商品的详情
			 */
			goToGoodsDetail() {
				this.$u.route('/pages_private_scene2/GroupPurchase/DistributionGoods?goodsNo=' + this.goods.goodsNo);
			},

			/**
			 * 选择客服
			 * @param {Object} e
			 */
			SelectCS(event) {
				this.csNameText = event[0].label;
				this.form.customerServiceId = event[0].value;
			},

			/**
			 * 选择报名截止时间
			 * @param {Object} e
			 */
			async SelectJoinEndTime(e) {
				let today = new Date().toLocaleDateString(); // 获取当前日期
				let dateStr = e.year + "-" + e.month + "-" + e.day;
				let diffValue = this.comparisonDate(dateStr, today);
				if (diffValue > 0) {
					this.form.joinEndTime = dateStr;
				} else {
					this.date_show = true;
				}
			},

			/**
			 * 计算日期差
			 * startTime 报名截止时间
			 * endTime   评级时间
			 * 返回天数差（大于0：表示报名截止时间 大于 评级时间 之后）
			 */
			comparisonDate(startTime, endTime) {
				// 日期格式化
				let start_date = new Date(startTime.replace(/-/g, "/"));
				let end_date = new Date(endTime.replace(/-/g, "/"));
				// 转成毫秒数，两个日期相减
				let ms = start_date.getTime() - end_date.getTime();
				// 转换成天数
				let day = parseInt(ms / (1000 * 60 * 60 * 24));
				// console.log("day = ", day);
				return day;
			},

			/**
			 * 前往付款
			 * 
			 * 1.检验数据
			 * 2.判断是否为后台配置支付特权人员
			 */
			async goToPay() {

				if (!this.isNotNull(this.form.samplePrice)) {
					this.showMSG('none', '请填写样品价格再提交噢！')
					return
				}
				
				if (!this.isNotNull(this.form.specification)) {
					this.showMSG('none', '请填写样品规格再提交噢！')
					return
				}
				if (!this.isNotNull(this.form.sampleQuota)) {
					this.showMSG('none', '请填写样品总数再提交噢！')
					return
				}

				if (!this.isNotNull(this.form.joinEndTime)) {
					this.showMSG('none', '请选择报名截止时间提交噢！')
					return
				}
				
				// 判断是否为后台配置支付特权人员
				if (this.PrivilegedStatus == "yes") {
					this.showItem = true;// 是，则可以选择支付额度
				} else {
					this.doWxPay('fullPayment');// 否，全额付款
				}

			},

			/**
			 * 选择支付的方式
			 */
			async clickPopup(item) {
				if (item.action == 'fullPayment' || item.action == 'payALittle') {
					this.doWxPay(item.action);
				} else if (item.action == 'closePopup') {
					this.showItem = false
				}
			},

			/**
			 * 关闭 选择支付的方式
			 */
			closePopup() {
				this.showItem = false;
			},
			
			/**
			 * 支付
			 */
			async doWxPay(action) {
				
				// ----------start---------组装数据-----------start-------------------
				// 测评等级要求
				if (this.restrictionLevel_text == 'A级') {
					this.form.restrictionLevel = 'A';
				} else if (this.restrictionLevel_text == 'B级+') {
					this.form.restrictionLevel = 'B';
				} else if (this.restrictionLevel_text == 'C级+') {
					this.form.restrictionLevel = 'C';
				} else if (this.restrictionLevel_text == 'D级+') {
					this.form.restrictionLevel = 'D';
				} else if (this.restrictionLevel_text == 'E级+') {
					this.form.restrictionLevel = 'E';
				} else if (this.restrictionLevel_text == 'F级+') {
					this.form.restrictionLevel = 'F';
				} else {
					this.form.restrictionLevel = '';
				}
				
				// 活动面向群体。0:测评师；1:区域服务商
				if (this.eventParticipants_text == '区域服务商') {
					this.form.eventParticipants = '1';
				} else {
					this.form.eventParticipants = '0';
				}
				
				// 开启反馈
				if (this.enableFeedback_text == '是') {
					this.form.enableFeedback = '1';
				} else {
					this.form.enableFeedback = '0';
				}
				
				// 是否需要填写试用报告
				if (this.enableReport_text == '是') {
					this.form.enableReport = '1';
				} else {
					this.form.enableReport = '0';
				}
				
				// 是否需要上传试用素材
				if (this.enableMaterial_text == '是') {
					this.form.enableMaterial = '1';
				} else {
					this.form.enableMaterial = '0';
				}
				
				// 是否需要上传社交平台截图凭证
				if (this.enableSocial_text == '是') {
					this.form.enableSocial = '1';
				} else {
					this.form.enableSocial = '0';
				}
				
				// 是否公开活动
				if (this.open_text == '是') {
					this.form.open = '1';
				} else {
					this.form.open = '0';
				}
				
				// 支付订单ID
				this.form.orderId = this.guid();// 商户订单号。可自定义也可让系统自动生成
				
				// ----------end---------组装数据-----------end-------------------

				if (!this.isNotNull(this.form.purchasePrice)) {
					this.showMSG('error', '应付金额为空，无法支付！');
					return;
				}

				// 显示 loading 提示框
				uni.showLoading({
					mask: true,
				});

				// 设置按钮为不可点击
				this.isClick = true;

				// 0.初始化订单信息
				// 格式化名字（名字超长处理）--- 暂不处理
				let Subject = this.FormatSubject(this.form.subject, 25);

				let name = Subject + "-预存样品发放费用";
				let price = 0;

				if (action == 'fullPayment') {
					console.log("********全额付款***********");
					price = parseFloat(this.form.purchasePrice) * 100; // 全额付款
				}
				if (action == 'payALittle') {
					console.log("********支付0.01元***********");
					price = 1; // 支付一分钱
				}

				// 定义商品信息串，建议这些字段定义规范并且固定（例如商品件数等数据），好方便订单系统进行展示
				let goodsInfo = {};
				goodsInfo.goodsNum = '1件'; // 件数
				goodsInfo.goodsWeight = '0kg'; // 重量

				// 定义商家信息串，建议这些字段定义规范并且固定（例如下面这两个字段），好方便订单系统进行展示
				let mchInfo = {};
				mchInfo.mchname = this.goods.MerchantName; // 商家名称
				mchInfo.mchimage = this.goods.MerchantIcon; // 商家图标

				let obj = {};
				obj.userid = uni.getStorageSync('userInfo').userId;
				obj.openid = uni.getStorageSync('userInfo').openid;
				obj.tradeDesc = name;
				obj.payPrice = price; // 付款金额
				obj.productID = this.goods.goodsNo; // 商品编号
				obj.productUrl = ''; // 订单详情页地址
				obj.imageUrl = this.goods.goodsImages.split(',')[0]; // 商品图片
				obj.goodsInfo = goodsInfo;
				obj.mchInfo = mchInfo;
				obj.remark = name;
				obj.tradeNo = this.form.orderId;
				
				// 业务数据
				let businessData = {
					initiatorId: uni.getStorageSync('userInfo').userId,
					initiatorName: uni.getStorageSync('userInfo').nickName,
					subject: this.form.subject,
					label: this.form.label,
					samplePrice: this.form.samplePrice,
					specification: this.form.specification,
					sampleQuota: this.form.sampleQuota,
					remainQuota: this.form.sampleQuota,
					joinEndTime: this.form.joinEndTime,
					customerServiceId: this.form.customerServiceId,
					joinLimitDays: this.joinLimitDays_text,
					eventParticipants: this.form.eventParticipants,
					restrictionLevel: this.form.restrictionLevel,
					endTime: this.form.joinEndTime,
					sceneAssetsId: this.goods.sceneAssetsId,
					sceneId: this.goods.sceneId,
					orderId: this.form.orderId,
					purchasePrice: this.form.purchasePrice,
					discountPrice: this.goods.discountPrice,
					consumerShareReward: this.goods.consumerShareReward,
					foremanReward: this.goods.foremanReward,
					goodsId: this.goods.goodsId,
					status: '1',// 状态。0:结束；1:启用
					enableFeedback: this.form.enableFeedback,
					enableReport: this.form.enableReport,
					enableMaterial: this.form.enableMaterial,
					enableSocial: this.form.enableSocial,
					requiredContent: this.form.requiredContent,
					levelAReward: this.form.levelAReward,
					levelBReward: this.form.levelBReward,
					levelCReward: this.form.levelCReward,
					levelACouponAmount: this.form.levelACouponAmount,
					levelBCouponAmount: this.form.levelBCouponAmount,
					levelCCouponAmount: this.form.levelCCouponAmount,
					levelACouponRange: this.form.levelACouponRange,
					levelBCouponRange: this.form.levelBCouponRange,
					levelCCouponRange: this.form.levelCCouponRange,
					open: this.form.open,
					ratingCriteria: this.form.ratingCriteria,
				};
				let orderExtJson = {
					type: 0,// 发起样品
					data: businessData // 业务数据
				}
				obj.orderExtJson = JSON.stringify(orderExtJson);
				
				// 1.调用微信支付接口鉴权，返回鉴权信息
				let authinfo = await this.geAuthInfo(obj);
				console.info("支付接口1.authinfo=", authinfo);
				if (authinfo.code != 200) {
					console.log("鉴权失败：" + authinfo);
					this.showMSG('error', '支付失败！');
					this.isClick = false; // 设置按钮为可点击
					return;
				}

				// 2.调用 小程序支付统一接口，这里是以url判断是哪个接口的
				let url = "/api/unifiedorder";
				let respJson = await this.postWxpayServer(url, obj, authinfo);
				console.info("支付接口2.respJson=", respJson);
				if (respJson.code != 200) {
					console.log("调用小程序支付统一接口失败：" + respJson.msg);
					this.showMSG('error', '支付失败！');
					this.isClick = false; // 设置按钮为可点击
					return;
				}

				// 3.开始发起支付动作
				let paymentdata = respJson.data;
				console.log("支付接口3.paymentdata=", paymentdata);
				// hasNext：true表示要发起微信支付，false表示已支付成功
				if (!paymentdata.hasNext) {
					// 0元支付成功（表示写支付记录成功，并未真的进行支付）
					console.log("0元支付成功");
					/**
					 * 延时查询业务是否处理成功；
					 * 1.处理成功，则跳转到订单详情
					 * 2.处理未成功，则提交流程(再次进行业务处理)
					 */
					setTimeout(() => {
						// 根据订单id判断后端是否已经处理好业务
						this.getActivityDetails(this.form.orderId);
					}, 1500);
					return;
				}

				// 开始发起支付动作，进入到这里表示 hasNext = true，需要调用发起微信支付*/
				let that = this;
				let payTag = '';// 记录是否支付成功。0:未支付成功；1:支付成功
				wx.requestPayment({
					...paymentdata,
					success(res) {
						// 此处只能返回通信成功，返回的并不是支付成功，只能在complete中进行业务处理
						console.log("支付成功", res);
						payTag = '1';// 支付成功
					},
					fail(err) {
						console.log("支付失败", err);
						// that.showMSG('error', '支付失败！');
						that.showItem = false; // 关闭 选择支付的方式
						that.isClick = false; // 设置按钮为可点击
						payTag = '0';// 支付失败
					},
					complete(res) {
						/**
						 * 延时查询业务是否处理成功；
						 * 1.业务处理成功，则跳转到报名页面
						 * 2.业务处理未成功，则提交流程(再次进行业务处理)
						 */
						if(payTag == '1'){// 支付成功才会执行
							setTimeout(() => {
								// 根据订单id判断后端是否已经处理好业务
								that.getActivityDetails(that.form.orderId);
							}, 1500);
						}
					}
				});
			},
			
			/**
			 * 根据订单id判断后端是否已经处理好业务
			 */
			async getActivityDetails(orderId){
				let result = await this.$u.api.unifyMiniRestGet({
					systemid: "meily",
					url: "/provide/samples/info/byOrderId/" + orderId,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					if(result.data){
						// 1.处理成功，则跳转到报名页面
						uni.reLaunch({
							url: '/pages_private_scene2/provide_samples/sign_up?docUnid=' + result.data.id
						});
					} else {
						// 2.处理未成功，则提交流程(再次进行业务处理)
						this.placeOrder();
					}
				} else {
					this.$u.toast(result.msg)
				}
			},

			/**
			 * 提交
			 */
			async placeOrder() {
				console.log("提交......");
				console.log("this.form=", this.form);
				let result = await this.$u.api.unifyMiniRest({
					systemid: "meily",
					url: "/provide/samples/publish",
					initiatorId: uni.getStorageSync('userInfo').userId,
					initiatorName: uni.getStorageSync('userInfo').nickName,
					subject: this.form.subject,
					label: this.form.label,
					samplePrice: this.form.samplePrice,
					specification: this.form.specification,
					sampleQuota: this.form.sampleQuota,
					remainQuota: this.form.sampleQuota,
					joinEndTime: this.form.joinEndTime,
					customerServiceId: this.form.customerServiceId,
					joinLimitDays: this.joinLimitDays_text,
					eventParticipants: this.form.eventParticipants,
					restrictionLevel: this.form.restrictionLevel,
					endTime: this.form.joinEndTime,
					sceneAssetsId: this.goods.sceneAssetsId,
					sceneId: this.goods.sceneId,
					orderId: this.form.orderId,
					purchasePrice: this.form.purchasePrice,
					discountPrice: this.goods.discountPrice,
					consumerShareReward: this.goods.consumerShareReward,
					foremanReward: this.goods.foremanReward,
					goodsId: this.goods.goodsId,
					status: '1',// 状态。0:结束；1:启用
					enableFeedback: this.form.enableFeedback,
					enableReport: this.form.enableReport,
					enableMaterial: this.form.enableMaterial,
					enableSocial: this.form.enableSocial,
					requiredContent: this.form.requiredContent,
					levelAReward: this.form.levelAReward,
					levelBReward: this.form.levelBReward,
					levelCReward: this.form.levelCReward,
					levelACouponAmount: this.form.levelACouponAmount,
					levelBCouponAmount: this.form.levelBCouponAmount,
					levelCCouponAmount: this.form.levelCCouponAmount,
					levelACouponRange: this.form.levelACouponRange,
					levelBCouponRange: this.form.levelBCouponRange,
					levelCCouponRange: this.form.levelCCouponRange,
					open: this.form.open,
					ratingCriteria: this.form.ratingCriteria,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if (result.code == 200) {
					uni.hideLoading();
					uni.reLaunch({
						url: '/pages_private_scene2/provide_samples/sign_up?docUnid=' + result.data.id
					});
				} else {
					this.$u.toast(result.msg);
				}
			},

			/**
			 * 格式化订单名字（名字超长处理）
			 * name：需要处理的字段
			 * MaxLength：要保留的最大长度，包含...
			 */
			FormatSubject(name, MaxLength) {
				let cutName = "";
				if (name.length > MaxLength) {
					// 超出的长度，需要截取
					let cutLength = name.length - (name.length - MaxLength) - 3; // 3表示三个省略号的长度
					cutName = name.substring(0, cutLength) + "...";
				} else {
					cutName = name;
				}
				return cutName;
			},

			/**
			 * 点击问号提示
			 */
			showTips(type) {
				if (type == 'samplePrice') {
					this.TipsContent = this.TipsContentObj.samplePriceContent
					this.TipsShow = true
				} else if (type == 'sampleQuota') {
					this.TipsContent = this.TipsContentObj.sampleQuotaContent
					this.TipsShow = true
				} else if (type == 'joinEndTime') {
					this.TipsContent = this.TipsContentObj.joinEndTimeContent
					this.TipsShow = true
				} else if (type == 'CS') {
					this.TipsContent = this.TipsContentObj.CSContent
					this.TipsShow = true
				} else if (type == 'joinLimitDays') {
					this.TipsContent = this.TipsContentObj.joinLimitDaysContent
					this.TipsShow = true
				} else if (type == 'eventParticipants') {
					this.TipsContent = this.TipsContentObj.eventParticipantsContent
					this.TipsShow = true
				} else if (type == 'restrictionLevel') {
					this.TipsContent = this.TipsContentObj.restrictionLevelContent
					this.TipsShow = true
				} else if (type == 'discountPrice') {
					this.TipsContent = this.TipsContentObj.discountPriceContent
					this.TipsShow = true
				} else if (type == 'consumerShareReward') {
					this.TipsContent = this.TipsContentObj.consumerShareRewardContent
					this.TipsShow = true
				} else if (type == 'foremanReward') {
					this.TipsContent = this.TipsContentObj.foremanRewardContent
					this.TipsShow = true
				}
			},
			
		}
	}
</script>

<style scoped>
	aui-flexView {
		width: 100%;
		height: 100%;
		margin: 0 auto;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		flex-direction: column;
	}

	.aui-scrollView {
		width: 100%;
		height: 100%;
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		-ms-flex: 1;
		flex: 1;
		overflow-y: auto;
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
		position: relative;
		margin-top: 0;
	}

	.aui-navBar {
		height: 44px;
		position: relative;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		z-index: 1002;
		background: #f7f7f7;
	}

	.b-line {
		position: relative;
	}

	.b-line:after {
		content: '';
		position: absolute;
		z-index: 2;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 1px;
		border-bottom: 1px solid #e2e2e2;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
		-webkit-transform-origin: 0 100%;
		transform-origin: 0 100%;
	}

	.aui-navBar-item {
		height: 44px;
		min-width: 25%;
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 25%;
		-ms-flex: 0 0 25%;
		flex: 0 0 25%;
		padding: 0 0.9rem;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		-ms-flex-align: center;
		align-items: center;
		font-size: 0.7rem;
		white-space: nowrap;
		overflow: hidden;
		color: #353535;
		position: relative;
	}

	.aui-navBar-item:first-child {
		-webkit-box-ordinal-group: 2;
		-webkit-order: 1;
		-ms-flex-order: 1;
		order: 1;
		margin-right: -25%;
		font-size: 0.9rem;
		font-weight: bold;
	}

	.aui-navBar-item:last-child {
		-webkit-box-ordinal-group: 4;
		-webkit-order: 3;
		-ms-flex-order: 3;
		order: 3;
		-webkit-box-pack: end;
		-webkit-justify-content: flex-end;
		-ms-flex-pack: end;
		justify-content: flex-end;
	}

	.aui-center {
		-webkit-box-ordinal-group: 3;
		-webkit-order: 2;
		-ms-flex-order: 2;
		order: 2;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-pack: center;
		-webkit-justify-content: center;
		-ms-flex-pack: center;
		justify-content: center;
		-webkit-box-align: center;
		-webkit-align-items: center;
		-ms-flex-align: center;
		align-items: center;
		height: 44px;
		width: 50%;
		margin-left: 25%;
	}

	.aui-center-title {
		text-align: center;
		width: 100%;
		white-space: nowrap;
		overflow: hidden;
		display: block;
		text-overflow: ellipsis;
		font-size: 0.95rem;
		color: #333;
	}

	.icon {
		width: 20px;
		height: 20px;
		display: block;
		border: none;
		float: left;
		background-size: 20px;
		background-repeat: no-repeat;
	}

	.aui-flex {
		width: 90%;
		margin: 0 auto;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		padding: 30rpx 0;
		position: relative;
	}

	.aui-flex-box {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		min-width: 0;
		font-size: 14px;
		color: #333;
	}

	.aui-flex-triangle {
		position: relative;
		font-size: 14px;
		padding-right: 15px;
	}

	.aui-flex-triangle:before {
		content: '';
		width: 0;
		height: 0;
		border-width: 5px 0px 5px 8px;
		border-style: solid;
		border-color: transparent transparent transparent #7b7b7b;
		position: absolute;
		top: 6px;
		right: 0;
		border-radius: 1;
	}

	.aui-choice-white {
		background: #fff;
	}

	.aui-order-box {
		padding: 20rpx 0rpx;
	}

	.aui-flex-goods {
		margin-right: .8em;
		width: 80px;
		height: 80px;
		line-height: 80px;
		text-align: center;
	}

	.aui-flex-goods img {
		width: 100%;
		max-height: 100%;
		vertical-align: top;
	}

	.aui-flex-default {
		background: #ffffff;
	}

	.aui-flex-default h2 {
		font-size: 14px;
		width: auto;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		word-wrap: normal;
		word-wrap: break-word;
		word-break: break-all;
		padding-bottom: 5px;
	}

	.aui-flex-default p {
		color: #999999;
		font-size: 12px;
	}

	.aui-flex-clear {
		padding: 0;
		margin-top: 20rpx;
	}

	.aui-flex-clear .aui-flex-box {
		color: #f21956;
		font-weight: bold;
	}

	.aui-mar15 {
		margin-bottom: 15px;
	}

	.aui-flex-triangle-clear:before {
		border-color: #fff;
	}

	.aui-flex-box h2 {
		font-size: 16px;
		padding-bottom: 5px;
	}

	.aui-flex-box h3 {
		font-size: 14px;
		padding-bottom: 5px;
	}

	.aui-flex-box p {
		font-size: 12px;
		color: #999;
		line-height: 1.2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
	}

	.aui-bar-footer {
		line-height: 52px;
		height: 52px;
		background: #fff;
		box-shadow: 0 -2px 10px #ddd;
		position: fixed;
		z-index: 999;
		bottom: 0;
		left: 0;
		width: 100%;
	}

	.aui-btn-button {
		background: #f21956;
		padding: 0 25px;
		color: #fff;
		font-size: 14px;
	}

	.aui-bar-footer .aui-flex {
		padding: 0;
	}

	.aui-bar-footer .aui-flex-box {
		padding-left: 15px;
	}

	.aui-bar-footer .aui-flex-box span {
		font-style: normal;
		color: #f21956;
	}

	.cnt {
		padding-top: 1px;
		color: #e61111;
		position: relative;
		line-height: 22px;
		font-size: 14px;
		font-weight: 500;
	}

	.popup-box {
		padding-bottom: 50rpx;
		padding-top: 50rpx;
	}

	.popup-item {
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 33rpx;
	}

	.discount_info {
		border-bottom: 1px solid black;
		border-left-width: 0;
		border-top-width: 0;
		border-right-width: 0;
		width: 50px;
		height: 30px;
		text-align: center;
		padding-left: 15px;
	}

	.swipe-content {
		display: flex;
		flex-direction: row;
		background: #fff;
		border-bottom: 1rpx solid #eee;
		line-height: 35px;
	}

	.richtext-block {
		background: #f3f3f3;
		width: 100%;
		margin: 0 auto;
		border-radius: 5px;
		padding: 20rpx;
		height: 540rpx;
	}

	.aui-flex-tags {
		width: 435rpx;
		text-align: left;
	}

	.mod-richtext {
		padding: 15px;
		height: 450px;
		overflow-y: scroll;
	}

	.Tips {
		font-size: 24rpx;
		line-height: 24rpx;
		margin-top: 12rpx;
		color: #9a9a9a;
		/* padding: 30rpx;
		margin: 0; */
		word-break: break-all;
		-webkit-overflow-scrolling: touch;
		-webkit-tap-highlight-color: transparent;
		text-size-adjust: 100%;
		box-sizing: border-box;
	}
	
	.textarea-block {
		background: #f5f5f5;
		width: 93%;
		/* margin: 0 auto; */
		border-radius: 5px;
		padding: 20rpx;
		height: 11.5rem;
		user-select: text !important;
		-webkit-user-select: text;
	}
	
	.textarea-block textarea {
		width: 100%;
		padding: 1rem;
		font-size: 0.95rem;
		overflow: hidden;
		resize: none;
		height: 8rem;
		border: none;
		background: none;
		line-height: 1.8;
	}
	
	.aui-flex-box-title {
		padding: 30rpx 0 30rpx 0;
		font-size: 32rpx;
		font-weight: bold;
	}
	
	.aui-flex2 {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		padding: 0rpx 0rpx 30rpx 0rpx;
		position: relative;
	}
	.aui-flex3 {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		flex-direction: column;
		padding: 0rpx 0rpx 30rpx 0rpx;
		position: relative;
	}
	
	.coupon-item {
		width: 90%;
		margin: 0 auto;
	}
	
	.border-radius30 {
		border-radius: 30rpx;
	}
	
	.aui-flex-goodsbox {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		padding: 30rpx 40rpx;
		position: relative;
		border-radius: 30rpx;
	}
	
	.goods-box-price {
		color: #f21956;
		font-size: 36rpx;
		font-weight: bold;
	}
	
	.goods-box-spec {
		color: #9f9d9e;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	
	.aui-flex-footer {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		position: relative;
	}
	
</style>